removeXml Method |
This method removes the XML document from the local store and also updates the Local_Store_Index file based on the expiration date mentioned.
Syntax
bSuccess = object.removeXml(sName[, dExpirationDate]);
Parameters
Parameter |
Description |
---|---|
sName |
Required. String that specifies the name of the XML document to be removed from local store. |
dExpirationDate |
Optional. Date when the XML document should be removed from the local store. |
Return Value
Returns one of the following possible values.
true |
XML document has been successfully deleted from the local store. |
false |
XML document could not be deleted. |
Remarks
It also removes any reference to the deleted XML document in the Local_Store_Index file. If the expirationDate is set as Null or 0 or left blank the document is deleted immediately.
Example
The following example shows how to save an XML document from the local store.
var oTimeNow = new Date(); oTimeNow.setDate(oTimeNow.getDate() + parseInt(expiryDurationValue)); var sExpirationDate = oTimeNow.toUTCString(); //oPersist is the Id of the buslocalstore object oPersist.removeXml("myData"); oPersist.createXml("myData", xmlData.XMLDocument.documentElement, sExpirationDate);